Integrand size = 19, antiderivative size = 133 \[ \int \sin (c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {3 a^2 b \text {arctanh}(\sin (c+d x))}{d}-\frac {3 b^3 \text {arctanh}(\sin (c+d x))}{2 d}-\frac {a^3 \cos (c+d x)}{d}+\frac {3 a b^2 \cos (c+d x)}{d}+\frac {3 a b^2 \sec (c+d x)}{d}-\frac {3 a^2 b \sin (c+d x)}{d}+\frac {3 b^3 \sin (c+d x)}{2 d}+\frac {b^3 \sin (c+d x) \tan ^2(c+d x)}{2 d} \]
3*a^2*b*arctanh(sin(d*x+c))/d-3/2*b^3*arctanh(sin(d*x+c))/d-a^3*cos(d*x+c) /d+3*a*b^2*cos(d*x+c)/d+3*a*b^2*sec(d*x+c)/d-3*a^2*b*sin(d*x+c)/d+3/2*b^3* sin(d*x+c)/d+1/2*b^3*sin(d*x+c)*tan(d*x+c)^2/d
Leaf count is larger than twice the leaf count of optimal. \(637\) vs. \(2(133)=266\).
Time = 6.79 (sec) , antiderivative size = 637, normalized size of antiderivative = 4.79 \[ \int \sin (c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {3 a b^2 \cos ^3(c+d x) (a+b \tan (c+d x))^3}{d (a \cos (c+d x)+b \sin (c+d x))^3}-\frac {a \left (a^2-3 b^2\right ) \cos ^4(c+d x) (a+b \tan (c+d x))^3}{d (a \cos (c+d x)+b \sin (c+d x))^3}-\frac {3 \left (2 a^2 b-b^3\right ) \cos ^3(c+d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) (a+b \tan (c+d x))^3}{2 d (a \cos (c+d x)+b \sin (c+d x))^3}+\frac {3 \left (2 a^2 b-b^3\right ) \cos ^3(c+d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right ) (a+b \tan (c+d x))^3}{2 d (a \cos (c+d x)+b \sin (c+d x))^3}+\frac {b^3 \cos ^3(c+d x) (a+b \tan (c+d x))^3}{4 d \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2 (a \cos (c+d x)+b \sin (c+d x))^3}+\frac {3 a b^2 \cos ^3(c+d x) \sin \left (\frac {1}{2} (c+d x)\right ) (a+b \tan (c+d x))^3}{d \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) (a \cos (c+d x)+b \sin (c+d x))^3}-\frac {b^3 \cos ^3(c+d x) (a+b \tan (c+d x))^3}{4 d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2 (a \cos (c+d x)+b \sin (c+d x))^3}-\frac {3 a b^2 \cos ^3(c+d x) \sin \left (\frac {1}{2} (c+d x)\right ) (a+b \tan (c+d x))^3}{d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right ) (a \cos (c+d x)+b \sin (c+d x))^3}-\frac {b \left (3 a^2-b^2\right ) \cos ^3(c+d x) \sin (c+d x) (a+b \tan (c+d x))^3}{d (a \cos (c+d x)+b \sin (c+d x))^3} \]
(3*a*b^2*Cos[c + d*x]^3*(a + b*Tan[c + d*x])^3)/(d*(a*Cos[c + d*x] + b*Sin [c + d*x])^3) - (a*(a^2 - 3*b^2)*Cos[c + d*x]^4*(a + b*Tan[c + d*x])^3)/(d *(a*Cos[c + d*x] + b*Sin[c + d*x])^3) - (3*(2*a^2*b - b^3)*Cos[c + d*x]^3* Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]]*(a + b*Tan[c + d*x])^3)/(2*d*(a*C os[c + d*x] + b*Sin[c + d*x])^3) + (3*(2*a^2*b - b^3)*Cos[c + d*x]^3*Log[C os[(c + d*x)/2] + Sin[(c + d*x)/2]]*(a + b*Tan[c + d*x])^3)/(2*d*(a*Cos[c + d*x] + b*Sin[c + d*x])^3) + (b^3*Cos[c + d*x]^3*(a + b*Tan[c + d*x])^3)/ (4*d*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])^2*(a*Cos[c + d*x] + b*Sin[c + d *x])^3) + (3*a*b^2*Cos[c + d*x]^3*Sin[(c + d*x)/2]*(a + b*Tan[c + d*x])^3) /(d*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])*(a*Cos[c + d*x] + b*Sin[c + d*x] )^3) - (b^3*Cos[c + d*x]^3*(a + b*Tan[c + d*x])^3)/(4*d*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^2*(a*Cos[c + d*x] + b*Sin[c + d*x])^3) - (3*a*b^2*Cos[ c + d*x]^3*Sin[(c + d*x)/2]*(a + b*Tan[c + d*x])^3)/(d*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])*(a*Cos[c + d*x] + b*Sin[c + d*x])^3) - (b*(3*a^2 - b^2) *Cos[c + d*x]^3*Sin[c + d*x]*(a + b*Tan[c + d*x])^3)/(d*(a*Cos[c + d*x] + b*Sin[c + d*x])^3)
Time = 0.35 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3042, 4000, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sin (c+d x) (a+b \tan (c+d x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin (c+d x) (a+b \tan (c+d x))^3dx\) |
\(\Big \downarrow \) 4000 |
\(\displaystyle \int \left (a^3 \sin (c+d x)+3 a^2 b \sin (c+d x) \tan (c+d x)+3 a b^2 \sin (c+d x) \tan ^2(c+d x)+b^3 \sin (c+d x) \tan ^3(c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a^3 \cos (c+d x)}{d}+\frac {3 a^2 b \text {arctanh}(\sin (c+d x))}{d}-\frac {3 a^2 b \sin (c+d x)}{d}+\frac {3 a b^2 \cos (c+d x)}{d}+\frac {3 a b^2 \sec (c+d x)}{d}-\frac {3 b^3 \text {arctanh}(\sin (c+d x))}{2 d}+\frac {3 b^3 \sin (c+d x)}{2 d}+\frac {b^3 \sin (c+d x) \tan ^2(c+d x)}{2 d}\) |
(3*a^2*b*ArcTanh[Sin[c + d*x]])/d - (3*b^3*ArcTanh[Sin[c + d*x]])/(2*d) - (a^3*Cos[c + d*x])/d + (3*a*b^2*Cos[c + d*x])/d + (3*a*b^2*Sec[c + d*x])/d - (3*a^2*b*Sin[c + d*x])/d + (3*b^3*Sin[c + d*x])/(2*d) + (b^3*Sin[c + d* x]*Tan[c + d*x]^2)/(2*d)
3.1.34.3.1 Defintions of rubi rules used
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n _.), x_Symbol] :> Int[Expand[Sin[e + f*x]^m*(a + b*Tan[e + f*x])^n, x], x] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IGtQ[n, 0]
Time = 1.47 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.08
method | result | size |
derivativedivides | \(\frac {-a^{3} \cos \left (d x +c \right )+3 a^{2} b \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+3 a \,b^{2} \left (\frac {\sin ^{4}\left (d x +c \right )}{\cos \left (d x +c \right )}+\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )\right )+b^{3} \left (\frac {\sin ^{5}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}+\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{2}+\frac {3 \sin \left (d x +c \right )}{2}-\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(144\) |
default | \(\frac {-a^{3} \cos \left (d x +c \right )+3 a^{2} b \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+3 a \,b^{2} \left (\frac {\sin ^{4}\left (d x +c \right )}{\cos \left (d x +c \right )}+\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )\right )+b^{3} \left (\frac {\sin ^{5}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}+\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{2}+\frac {3 \sin \left (d x +c \right )}{2}-\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(144\) |
risch | \(\frac {3 i {\mathrm e}^{i \left (d x +c \right )} b \,a^{2}}{2 d}-\frac {i {\mathrm e}^{i \left (d x +c \right )} b^{3}}{2 d}-\frac {{\mathrm e}^{i \left (d x +c \right )} a^{3}}{2 d}+\frac {3 \,{\mathrm e}^{i \left (d x +c \right )} a \,b^{2}}{2 d}-\frac {3 i {\mathrm e}^{-i \left (d x +c \right )} b \,a^{2}}{2 d}+\frac {i {\mathrm e}^{-i \left (d x +c \right )} b^{3}}{2 d}-\frac {{\mathrm e}^{-i \left (d x +c \right )} a^{3}}{2 d}+\frac {3 \,{\mathrm e}^{-i \left (d x +c \right )} a \,b^{2}}{2 d}-\frac {i b^{2} {\mathrm e}^{i \left (d x +c \right )} \left (6 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{2 i \left (d x +c \right )}+6 i a -b \right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a^{2}}{d}-\frac {3 b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 d}-\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a^{2}}{d}+\frac {3 b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 d}\) | \(309\) |
1/d*(-a^3*cos(d*x+c)+3*a^2*b*(-sin(d*x+c)+ln(sec(d*x+c)+tan(d*x+c)))+3*a*b ^2*(sin(d*x+c)^4/cos(d*x+c)+(2+sin(d*x+c)^2)*cos(d*x+c))+b^3*(1/2*sin(d*x+ c)^5/cos(d*x+c)^2+1/2*sin(d*x+c)^3+3/2*sin(d*x+c)-3/2*ln(sec(d*x+c)+tan(d* x+c))))
Time = 0.27 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.08 \[ \int \sin (c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {12 \, a b^{2} \cos \left (d x + c\right ) - 4 \, {\left (a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (2 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (2 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (b^{3} - 2 \, {\left (3 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )^{2}} \]
1/4*(12*a*b^2*cos(d*x + c) - 4*(a^3 - 3*a*b^2)*cos(d*x + c)^3 + 3*(2*a^2*b - b^3)*cos(d*x + c)^2*log(sin(d*x + c) + 1) - 3*(2*a^2*b - b^3)*cos(d*x + c)^2*log(-sin(d*x + c) + 1) + 2*(b^3 - 2*(3*a^2*b - b^3)*cos(d*x + c)^2)* sin(d*x + c))/(d*cos(d*x + c)^2)
\[ \int \sin (c+d x) (a+b \tan (c+d x))^3 \, dx=\int \left (a + b \tan {\left (c + d x \right )}\right )^{3} \sin {\left (c + d x \right )}\, dx \]
Time = 0.36 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.96 \[ \int \sin (c+d x) (a+b \tan (c+d x))^3 \, dx=-\frac {b^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} + 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, \log \left (\sin \left (d x + c\right ) - 1\right ) - 4 \, \sin \left (d x + c\right )\right )} - 12 \, a b^{2} {\left (\frac {1}{\cos \left (d x + c\right )} + \cos \left (d x + c\right )\right )} - 6 \, a^{2} b {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right ) - 2 \, \sin \left (d x + c\right )\right )} + 4 \, a^{3} \cos \left (d x + c\right )}{4 \, d} \]
-1/4*(b^3*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) + 3*log(sin(d*x + c) + 1) - 3*log(sin(d*x + c) - 1) - 4*sin(d*x + c)) - 12*a*b^2*(1/cos(d*x + c) + co s(d*x + c)) - 6*a^2*b*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1) - 2*s in(d*x + c)) + 4*a^3*cos(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 12476 vs. \(2 (127) = 254\).
Time = 8.35 (sec) , antiderivative size = 12476, normalized size of antiderivative = 93.80 \[ \int \sin (c+d x) (a+b \tan (c+d x))^3 \, dx=\text {Too large to display} \]
1/4*(9*pi*a*b^2*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - tan(1/2*d*x)^2 - 4*tan(1 /2*d*x)*tan(1/2*c) - tan(1/2*c)^2 + 1)*tan(1/2*d*x)^6*tan(1/2*c)^6 - 6*a^2 *b*log(2*(tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2*tan(1/2*c) + 2*ta n(1/2*d*x)*tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 2*tan(1/2*c) + 1)/(tan(1/2*d*x)^2*tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2 *c)^2 + 1))*tan(1/2*d*x)^6*tan(1/2*c)^6 + 3*b^3*log(2*(tan(1/2*d*x)^2*tan( 1/2*c)^2 + 2*tan(1/2*d*x)^2*tan(1/2*c) + 2*tan(1/2*d*x)*tan(1/2*c)^2 + tan (1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 2*tan(1/2*c) + 1)/(tan(1/2*d *x)^2*tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 + 1))*tan(1/2*d*x)^6*ta n(1/2*c)^6 + 6*a^2*b*log(2*(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^2 *tan(1/2*c) - 2*tan(1/2*d*x)*tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) + 2*tan(1/2*c) + 1)/(tan(1/2*d*x)^2*tan(1/2*c)^2 + tan(1/ 2*d*x)^2 + tan(1/2*c)^2 + 1))*tan(1/2*d*x)^6*tan(1/2*c)^6 - 3*b^3*log(2*(t an(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^2*tan(1/2*c) - 2*tan(1/2*d*x)* tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) + 2*tan(1/2* c) + 1)/(tan(1/2*d*x)^2*tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 + 1)) *tan(1/2*d*x)^6*tan(1/2*c)^6 - 9*pi*a*b^2*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - tan(1/2*d*x)^2 - 4*tan(1/2*d*x)*tan(1/2*c) - tan(1/2*c)^2 + 1)*tan(1/2*d *x)^6*tan(1/2*c)^4 - 72*pi*a*b^2*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - tan(1/2 *d*x)^2 - 4*tan(1/2*d*x)*tan(1/2*c) - tan(1/2*c)^2 + 1)*tan(1/2*d*x)^5*...
Time = 6.43 (sec) , antiderivative size = 193, normalized size of antiderivative = 1.45 \[ \int \sin (c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (6\,a^2\,b-3\,b^3\right )+2\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-12\,a\,b^2+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (12\,a\,b^2-4\,a^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (6\,a^2\,b-3\,b^3\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (12\,a^2\,b-2\,b^3\right )+2\,a^3}{d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}+\frac {\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (6\,a^2\,b-3\,b^3\right )}{d} \]
(tan(c/2 + (d*x)/2)*(6*a^2*b - 3*b^3) + 2*a^3*tan(c/2 + (d*x)/2)^4 - 12*a* b^2 + tan(c/2 + (d*x)/2)^2*(12*a*b^2 - 4*a^3) + tan(c/2 + (d*x)/2)^5*(6*a^ 2*b - 3*b^3) - tan(c/2 + (d*x)/2)^3*(12*a^2*b - 2*b^3) + 2*a^3)/(d*(tan(c/ 2 + (d*x)/2)^2 + tan(c/2 + (d*x)/2)^4 - tan(c/2 + (d*x)/2)^6 - 1)) + (atan h(tan(c/2 + (d*x)/2))*(6*a^2*b - 3*b^3))/d